import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";
import { BannerDto } from "./banners-dto";

export class CreateBannerDto {
    @ApiProperty({
        description:'广告标识'
    })
    @IsNotEmpty({
        message:'广告标识不能为空'
    })
    identity: string;

    @ApiProperty({
        description:'广告名'
    })
    @IsNotEmpty({
        message:'广告名不能为空'
    })
    name: string;

    @ApiProperty({
        description:'描述',
        required:false
    })
    desc: string;

    @ApiProperty({
        description:'广告'
    })
    @IsNotEmpty({
        message:'广告不能为空'
    })
    banners: string|Array<BannerDto>;

    @ApiProperty({
        description:'状态'
    })
    @IsNotEmpty({
        message:'状态不能为空'
    })
    status: number;
}
